![]() |
ALMaSS
1.0
The Animal, Landscape and Man Simulation System
|
The newt egg class - in pond. More...
#include <Newt.h>
Public Member Functions | |
Newt_Egg (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib) | |
Newt_Egg constructor. More... | |
void | ReInit (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib) |
ReInit for object pool. More... | |
~Newt_Egg () | |
Newt destructor. More... | |
virtual void | Init () |
Newt_Egg Initialisation. More... | |
virtual void | Step (void) |
Newt_Egg Step code. This is called continuously until all animals report that they are 'DONE'. More... | |
void | InternalPesticideHandlingAndResponse () |
For handlng of class-specific pesticide effects. More... | |
![]() | |
Newt_Base (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib) | |
Newt constructor. More... | |
void | Init (vector< unsigned > a_pond, Newt_Population_Manager *a_NPM, bool a_reproinhib) |
Intitialise object. More... | |
void | ReInit (int a_x, int a_y, vector< unsigned > a_pond, Landscape *a_L, Newt_Population_Manager *a_NPM, bool a_reproinhib) |
ReInit for object pool. More... | |
~Newt_Base () | |
Newt destructor. More... | |
virtual int | WhatState () |
Returns the state number for display purposes. More... | |
TTypeOfNewtState | st_Develop (void) |
Behavioural state development - does nothing in the base class. More... | |
TTypeOfNewtState | st_Movement (void) |
Behavioural state movement - does nothing in the base class. More... | |
void | st_Dying (void) |
Behavioural state dying. More... | |
virtual void | BeginStep (void) |
The BeginStep is the first 'part' of the timestep that an animal can behave in. It is called once per timestep. More... | |
virtual void | EndStep (void) |
The EndStep is the third 'part' of the timestep that an animal can behave in. It is called once per timestep. More... | |
unsigned | GetAge () |
A typical interface function - this one returns the Age as an unsigned integer. More... | |
void | SetAge (unsigned a_age) |
A typical interface function - this one sets the Age as an unsigned integer. More... | |
unsigned | GetHomePond () |
A typical interface function - this one returns the home pond reference as an unsigned integer. More... | |
void | SetHomePond (unsigned a_pond) |
A typical interface function - this one sets the home pond reference as an unsigned integer. More... | |
void | InternalPesticideHandlingAndResponse (double) |
For handlng of class-specific pesticide effects. More... | |
![]() | |
unsigned | SupplyFarmOwnerRef () |
AnimalPosition | SupplyPosition () |
APoint | SupplyPoint () |
int | SupplyPolygonRef () |
int | Supply_m_Location_x () |
int | Supply_m_Location_y () |
virtual void | KillThis () |
virtual void | CopyMyself () |
void | SetX (int a_x) |
void | SetY (int a_y) |
TAnimal (int x, int y, Landscape *L) | |
virtual void | ReinitialiseObject (int x, int y, Landscape *L) |
Used to re-use an object - must be implemented in descendent classes. More... | |
virtual void | Dying () |
void | CheckManagement (void) |
void | CheckManagementXY (int x, int y) |
virtual bool | OnFarmEvent (FarmToDo) |
![]() | |
int | GetCurrentStateNo () |
Returns the current state number. More... | |
void | SetCurrentStateNo (int a_num) |
Sets the current state number. More... | |
bool | GetStepDone () |
Returns the step done indicator flag. More... | |
void | SetStepDone (bool a_bool) |
Sets the step done indicator flag. More... | |
virtual void | ReinitialiseObject () |
Used to re-use an object - must be implemented in descendent classes. More... | |
TALMaSSObject () | |
The constructor for TALMaSSObject. More... | |
virtual | ~TALMaSSObject () |
The destructor for TALMaSSObject. More... | |
void | OnArrayBoundsError () |
Used for debugging only, tests basic object properties. More... | |
Static Public Attributes | |
static double | m_EggPPPThreshold = cfg_NewtEggPPPToxTrigger.value() |
The threshold for effect of PPP on eggs. More... | |
static double | m_EggPPPElimRate = cfg_NewtEggPPPToxEliminationRate.value() |
The daily proportion of PPP body burden that is not eliminated for eggs. More... | |
static double | m_EggPPPEffectProbability = cfg_NewtEggPPPEffectProbability.value() |
The daily probability of effect if above m_EggPPPThreshold for eggs. More... | |
![]() | |
static double | m_EggDevelopmentDDTotal = cfg_NewtEggDevelTotal.value() |
static double | m_EggDevelopmentDDParameter = cfg_NewtEggDevelDDParameter.value() |
static double | m_JuvenileDevelopmentSize = cfg_NewtJuvenileDevelSize.value() |
static double | m_EggMortalityChance = cfg_NewtEggMortalityChance.value() |
static double | m_JuvenileMortalityChance = 0.0 |
static double | m_AdultMortalityChance = 0.0 |
static bool | m_test_pesticide_egg = cfg_Newt_Test_Pesticide_Egg.value() |
Flags to record whether we are in pesticide testing mode. More... | |
static bool | m_test_pesticide_larva = cfg_Newt_Test_Pesticide_Larva.value() |
static bool | m_test_pesticide_terrestrial = cfg_Newt_Test_Pesticide_Terrestrial.value() |
Protected Member Functions | |
virtual TTypeOfNewtState | st_Develop (void) |
Behavioural state development. More... | |
virtual TTypeOfNewtState | st_NextStage (void) |
Egg hatch. More... | |
![]() | |
void | CorrectWrapRound () |
Corrects wrap around co-ordinate problems. More... | |
Protected Attributes | |
double | m_AgeDegrees |
![]() | |
TTypeOfNewtState | m_CurrentNewtState |
Variable to record current behavioural state. More... | |
unsigned | m_Age |
vector< unsigned > | m_pondlist |
Newt_Population_Manager * | m_OurPopulationManager |
This is a time saving pointer to the correct population manager object. More... | |
double | m_body_burden |
The current PPP body burden for use in pesticide testing mode. More... | |
bool | m_reproductiveinhibition |
A flag to indicate environmentally induced reproductive inhibition (value is inherited by descendent classes) More... | |
![]() | |
int | m_Location_x |
int | m_Location_y |
Landscape * | m_OurLandscape |
![]() | |
int | m_CurrentStateNo |
The basic state number for all objects - '-1' indicates death. More... | |
bool | m_StepDone |
Indicates whether the iterative step code is done for this timestep. More... | |
The newt egg class - in pond.
Class Newt_Egg represents the egg stage of the newt in ponds. Each egg has a location in a pond polygon represented by it's home pond polygon reference (first entry in m_pondlist). The egg starts life at zero days old with zero day degrees. It ages each day ( see Newt_Egg::st_Develop ), and the temperature experiences is summed each day to create a cumulative day-degree sum. When this sum reaches a pre-defined number of day-degrees the egg hatches to produce a larva.
Newt_Egg::Newt_Egg | ( | int | a_x, |
int | a_y, | ||
vector< unsigned > | a_pond, | ||
Landscape * | a_L, | ||
Newt_Population_Manager * | a_NPM, | ||
bool | a_reproinhib | ||
) |
|
virtual |
Newt_Egg Initialisation.
References m_AgeDegrees.
Referenced by Newt_Egg(), Newt_Larva::Newt_Larva(), ReInit(), and Newt_Larva::ReInit().
void Newt_Egg::InternalPesticideHandlingAndResponse | ( | ) |
For handlng of class-specific pesticide effects.
This method is re-implemented from Newt_Base for any class which has pesticide response behaviour. If the body burden exceeds the trigger then an effect is tested for and implemented depending on the pesticide type.
References g_msg, g_rand_uni, TAnimal::KillThis(), Newt_Base::m_body_burden, Newt_Base::m_CurrentNewtState, m_EggPPPEffectProbability, m_EggPPPThreshold, TAnimal::m_OurLandscape, Newt_Base::m_reproductiveinhibition, Landscape::SupplyPesticideType(), toNewts_Die, ttop_AcuteEffects, ttop_MultipleEffects, ttop_NoPesticide, ttop_ReproductiveEffects, and MapErrorMsg::Warn().
Referenced by st_Develop().
void Newt_Egg::ReInit | ( | int | a_x, |
int | a_y, | ||
vector< unsigned > | a_pond, | ||
Landscape * | a_L, | ||
Newt_Population_Manager * | a_NPM, | ||
bool | a_reproinhib | ||
) |
ReInit for object pool.
References Init(), and Newt_Base::ReInit().
Referenced by Newt_Larva::ReInit().
|
protectedvirtual |
Behavioural state development.
Determines whether the egg sucumbs to daily mortality using a probability test against a daily probability (input parameter), if so return toNewts_Die state.
Next if there is the need to test for pesticide effects then the body-burden is adjusted for yesterdays elimination, then pesticide at this location is determined and any intake stored. If the body-burden is greater than the threshold for effects, then InternalPesticideHandlingAndResponse is called and the impacts determined. If the egg survives:
Reimplemented in Newt_Larva.
References g_rand_uni, Newt_Population_Manager::GetEggDDRateTransformation(), InternalPesticideHandlingAndResponse(), Newt_Base::m_Age, m_AgeDegrees, Newt_Base::m_body_burden, Newt_Base::m_CurrentNewtState, Newt_Base::m_EggDevelopmentDDTotal, Newt_Base::m_EggMortalityChance, m_EggPPPElimRate, TAnimal::m_OurLandscape, Newt_Base::m_OurPopulationManager, Newt_Base::m_pondlist, Newt_Base::m_test_pesticide_egg, Landscape::SupplyPondPesticide(), Landscape::SupplyTemp(), toNewts_Develop, toNewts_Die, and toNewts_NextStage.
Referenced by Step().
|
protectedvirtual |
Egg hatch.
Creates a new Newt_Larva object and passes the data from the young to it, then signals young object removal.
Reimplemented in Newt_Larva.
References struct_Newt::age, Newt_Population_Manager::CreateObjects(), struct_Newt::L, Newt_Base::m_Age, TALMaSSObject::m_CurrentStateNo, TAnimal::m_Location_x, TAnimal::m_Location_y, TAnimal::m_OurLandscape, Newt_Base::m_OurPopulationManager, Newt_Base::m_pondlist, Newt_Base::m_reproductiveinhibition, TALMaSSObject::m_StepDone, struct_Newt::NPM, struct_Newt::pondrefs, struct_Newt::reproinhib, toNewts_Remove, tton_Larva, struct_Newt::x, and struct_Newt::y.
Referenced by Step().
|
virtual |
Newt_Egg Step code. This is called continuously until all animals report that they are 'DONE'.
Reimplemented from Newt_Base.
Reimplemented in Newt_Larva.
References Newt_Base::m_CurrentNewtState, TALMaSSObject::m_CurrentStateNo, TAnimal::m_OurLandscape, TALMaSSObject::m_StepDone, st_Develop(), Newt_Base::st_Dying(), st_NextStage(), toNewts_Develop, toNewts_Die, toNewts_InitialState, toNewts_NextStage, toNewts_Remove, and Landscape::Warn().
|
protected |
A internal variable used to sum up the day-degrees experienced by the egg/larva
Referenced by Init(), Newt_Larva::Init(), st_Develop(), and Newt_Larva::st_Develop().
|
static |
The daily probability of effect if above m_EggPPPThreshold for eggs.
Referenced by InternalPesticideHandlingAndResponse(), and Newt_Population_Manager::Newt_Population_Manager().
|
static |
The daily proportion of PPP body burden that is not eliminated for eggs.
Referenced by Newt_Population_Manager::Newt_Population_Manager(), and st_Develop().
|
static |
The threshold for effect of PPP on eggs.
Referenced by InternalPesticideHandlingAndResponse(), and Newt_Population_Manager::Newt_Population_Manager().